package pers.buyusan.service.impl;

import org.apache.dubbo.config.annotation.Service;
import pers.buyusan.service.HelloService;

import java.util.Random;

@Service
public class HelloServiceImpl implements HelloService {
    @Override
    public String sayHello(String name) throws InterruptedException {
        System.out.println("sayHello方法被调用");
        Thread.sleep(new Random().nextInt(101));
        return "hello" + name;
    }

    @Override
    public String sayHaHaHa(String name) throws InterruptedException {
        System.out.println("sayHaHaHa方法被调用");
        Thread.sleep(new Random().nextInt(101));
        return "hahaha" + name;
    }

    @Override
    public String sayBye(String name) throws InterruptedException {
        System.out.println("sayBye方法被调用");
        Thread.sleep(new Random().nextInt(101));
        return "bye" + name;
    }
}
